package com.it.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.it.dao.UserMapper;
import com.it.domain.UserEntity;
import com.it.service.UserService;
import com.it.util.MD5Util;
import org.springframework.stereotype.Service;

/**
 * @author : code1997
 * @date : 2021/9/9 22:46
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> implements UserService {

    @Override
    public UserEntity checkUser(String username, String password) {
        return this.baseMapper.selectOne(new QueryWrapper<UserEntity>().eq("username", username).eq("password", MD5Util.md5(password)));
    }
}
